package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.IIntegralService;
import cn.wolfcode.trip.base.service.IProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//商品资源控制器
@RestController
@RequestMapping("/productType")
public class ProductTypeController {
    @Autowired
    private IProductTypeService productTypeService;

    /**
     * 查所有分类下的所有商品
     * 资源:/productType/products
     * 动作:Get
     */
    @GetMapping("/products")
    public Object getTypeProducts(QueryObject qo){

        return productTypeService.queryProductType(qo);
    }
}
